package net.wanho.zaixian.course.service.impl;

import net.wanho.zaixian.course.dao.SysDictDao;
import net.wanho.zaixian.course.service.SysDictService;
import net.wanho.zaixian.pojo.system.SysDict;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class SysDictServiceImpl implements SysDictService {

    @Resource
    private SysDictDao sysDictDao;

    /**
     * 效率较低的做法，不推荐，
     * @param dType
     * @return
     */
    @Override
    public List<SysDict> getAllGrade(String dType) {
        SysDict sysDict = new SysDict();
        sysDict.setDType(dType);
        Example<SysDict> of = Example.of(sysDict);
        List<SysDict> sysDictList = sysDictDao.findAll(of);
        return sysDictList;
    }






}
